//
//  AboutViewController.m
//  carSecretary
//
//  Created by huangliru on 14-9-9.
//  Copyright (c) 2014年 huangliru. All rights reserved.
//

#import "AboutViewController.h"

@interface AboutViewController ()

@end

@implementation AboutViewController

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

- (void)viewDidLoad
{
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    //创建一个导航栏
    UINavigationBar *bar = [[UINavigationBar alloc]initWithFrame:CGRectMake(0, 18, 320, 44)];
    //创建一个导航栏集合
    UINavigationItem *navigationItem = [[UINavigationItem alloc] initWithTitle:nil];
    //创建一个左边按钮
    UIBarButtonItem *leftButton = [[UIBarButtonItem alloc] initWithTitle:@"返回" style:UIBarButtonItemStyleBordered target:self action:@selector(backButton)];
    //设置导航栏内容
    [navigationItem setTitle:@"关于我们"];
    //把导航栏集合添加入导航栏中，设置动画关闭
    [bar pushNavigationItem:navigationItem animated:NO];
    //把左按钮添加入导航栏集合中
    [navigationItem setLeftBarButtonItem:leftButton];
    bar.backgroundColor = [UIColor grayColor];
    [self.view addSubview:bar];
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}
// 导航栏返回按钮
-(void)backButton
{
    [self dismissViewControllerAnimated:NO completion:nil];
}
/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
